﻿using Architecture.Domain.Service;
using Architeture.Domain.DTO;
using MediatR;
using RBAC.ZhuBoLin.Application.Command.RoleCommand;

namespace RBAC.ZhuBoLin.Application.CommandHandlers.RoleHandler
{
    public class UserGetInfoCommandHandler : IRequestHandler<UserGetInfoCommand, List<ByUserInfo>>
    {
        private readonly IUserService _userService;

        public UserGetInfoCommandHandler(IUserService userService)
        {
            _userService = userService;
        }

        public async Task<List<ByUserInfo>> Handle(UserGetInfoCommand request, CancellationToken cancellationToken)
        {
            return await _userService.GetUerInfoBybid(request.id);
        }
    }
}
